<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="/resource/UserPwoer.tld" prefix="p"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	pageContext.setAttribute("userPwoer", request.getSession().getAttribute("userPwoer"));
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title id="title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/DDMBase.js"></script>

<link rel="stylesheet"
	href="${path }/resource/weixin/css/house-list.css">
<style type="text/css">
.addbtn {
	width: 100%;
	text-align: center;
	border: 1px solid #eee;
}
</style>
</head>

<body>
	<!-- 头部 -->
	<jsp:include page="_top.jsp"></jsp:include>
	<!-- 头部结束 -->
	<!-- 搜索框 -->
	<form id="dataform" onsubmit="javascripr:return false;">
		<%-- <div class="search-div">
			 <input type="hidden"
				name="offset" id="_offset" value="0" /> <input type="hidden"
				id="limit" name="limit" value="20" /> <input type="search" value="${keyWord }"
				name="fyTitle" id="keyWord" class="search-input" placeholder="请输入关键词"> <i
				class="am-icon-search color-9"></i>

		</div> --%>
		<!-- 主内容 -->
		<div class="title ">
			<div class="margin-1" >
				<select onchange="changeSelect(this)" datatype="*" id="fyKinds"
					class="form-control autoFull house-select padding-1 " style="width: 100%;" name="source" data-filed="name"
					data-value="name" 
					data-url="${path}/visitor/dataDictionary/showDataDictionary"
					data-param="{type:'订单类型'}">
					<option value=''>--请选择订单类型--</option>
				</select> 
			</div>
			<!-- 房产列表 -->
			<div data-am-widget="list_news"
				class="am-list-news am-list-news-default">

				<div class="am-list-news-bd">
					<ul class="am-list" id="data">
						<li class="margin">
							
							<!-- <div class="padding-10 li-top back-9 color-w">No147652350521111</div>
							<div class="padding-1 float-r color-y font-w6 font-s1">成功</div>
							<div class="padding-1 font-w6 font-s1">置顶7天</div>
							<div class="color-9 padding-1 float-r">2015/9/12 8:20</div>
							<div class=" padding-1 ">&yen;100</div> -->
							
							
							
						</li>
					</ul>
					<button id="addhas" class="addbtn" onclick="addData()"
						style="display: none;">加载更多</button>
					<button id="addno" class="addbtn" style="display: none;">已到底部</button>
				</div>
			</div>
		</div>
	</form>
	<!-- 主内容结束 -->
	<script type="text/javascript">
	//加载数据
	$(function() {
		
		MTools.autoFullSelect();
		var pageSize = $("#limit").val();
		Pagination
				.init({
					url : basePath+"/customer/zdOrder/findMyFy",
					pageSize : pageSize,
					builderDate : function(loj) {
						if (loj.getRowCount() <= 0) {
							$("#addhas").hide();
							$("#addno").show();
							return;
						} else {
							$("#addhas").show();
							$("#addno").hide();
						}
						var html = "";
						for(var i=0;i<loj.getRowCount();i++){
							html+='<li class="margin-t1">'+							
							'<div class="padding-10 li-top back-9 color-w">'+loj.getString(i,"orderNo")+'</div>'+
							'<div class="padding-1 float-r color-y font-w6 font-s1">'+loj.getString(i,"remark")+'</div>'+
							'<div class="padding-1 font-w6 font-s1">'+loj.getString(i,"spInfo")+'</div>'+
							'<div class="color-9 padding-1 float-r">'+loj.getDate(i,"orderTime")+'</div>'+
							'<div class=" padding-1 ">&yen;'+loj.getString(i,"total")+'</div>'+
							'</li>';	
						}
						
						 $("#data").append(html); 
					}
				});
		addData();
	})
	var pageNow =0;
	function addData() {
		pageNow++;
		Pagination.changePage(pageNow);
	}
	

	function changeSelect() {
		$("#data").html("");
		 pageNow = 1;
		Pagination.changePage(pageNow);
	}

	</script>
</body>
</html>